import java.util.regex.Matcher;
import java.util.regex.Pattern;

public class RegExp02 {
    public static void main(String[] args) {
        String content = "abc$(a.abc(123(";

        //  \\ 是转义字符
        String regStr = "\\.";

        //  \\( 的意思就是 字符串(
        //String regStr = "\\(";

        //创建模式对象
        Pattern pattern = Pattern.compile(regStr);

        //匹配模式对象
        Matcher matcher = pattern.matcher(content);

        //遍历 字符串进行匹配
        while (matcher.find()) {
            System.out.println("找到" + matcher.group(0));
        }
    }
}
